<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
 * 你写下的每个字，都值得被温柔对待。
 * 
 * 你可以在<a href="https://amrx.me">静语·偶尔有风</a>获得更多关于此皮肤的信息
 * 
 * @package Restext Theme 
 * @author 简 / Jane
 * @version 1.0.0
 * @link https://amrx.me
 */
$this->need('header.php');
?>
        
        <main class="container">
            <section class="category-header">
                <div class="category-header-content">
                    <h1 class="category-title">
                        <?php $this->archiveTitle(array('category' => _t('%s')), '', ''); ?>
                        <em class="num"><?php echo $this->getTotal(); ?>篇</em>
                    </h1>
                    <?php if ($this->getDescription()): ?>
                    <p class="category-description">
                        <?php echo $this->getDescription(); ?>
                    </p>
                    <?php endif; ?>
                </div>
            </section>
            <article class="category-article-list category-<?php echo $this->getArchiveSlug(); ?>">
                <?php if ($this->have()): ?>
                <?php while($this->next()): ?>
                <?php if ($this->is('category', 'photos')): ?><!-- 相册样式 -->
                <li>
                    <header class="photos-time">
                        <span class="left"><?php $this->date('d'); ?></span>
                        <span class="right">
                            <p><?php $this->date('Y年m月'); ?></p>
                            <p><?php echo formatTime($this->created); ?></p>
                        </span>
                    </header>
                    <footer class="photos-article photos text-layout-img">
                        <?php echo getArticleImage($this,'single');?>
                    </footer>
                </li>
                <?php endif; ?>
                <?php endwhile; ?>
                <?php else: ?>
                <span style="position:absolute;display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 6rem);color:var(--color-text-primary);">
                    暂无文章
                </span>
                <?php endif; ?>
            </article>
            <nav class="footer-nav">
                <?php $this->pageNav('<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 18l-6-6 6-6"/></svg>', '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18l6-6-6-6"/></svg>', 1, '...', array('wrapTag' => 'ol', 'wrapClass' => 'page-navigator', 'itemTag' => 'li', 'textTag' => 'span', 'currentClass' => 'current', 'prevClass' => 'prev', 'nextClass' => 'next',)); ?>
            </nav>
        </main>
    
    <?php $this->need('layout/footer.php');?>
    <?php $this->need('footer.php');?>